<template>
<span class="opera_model-wrapper">
  <button v-if="col.btns.REFUNDDETAIL" class="ui button primary mini" @click.stop.prevent="refundDetail"
          title="查看">{{col.btns.REFUNDDETAIL}}</button>
  <button v-if="col.btns.REFUNDAUDIT&&status==1" class="ui button primary mini" @click.stop.prevent="refundAudit(col.val)"
            title="审核">{{col.btns.REFUNDAUDIT}}</button>
</span>
</template>
<script type="text/ecmascript-6">
    import tool from 'src/util/tool';
    import util from '_util/index';
    import logic from '_logic';
    export default {
        data() {
            return {}
        },
        methods: {
            refundDetail(){
                /**
                 * 触发mypop.vue下showPopCom监听事件 显示refundDetail模板
                 * */
                let order_detail_id =logic.detail.getDetail(this, this._id,'order_detail_id').val;
                this.$store.state.global.eventVue.$emit('showPopCom', {_this: this, id: order_detail_id, name: 'spOrderDetail',data:{operateShow:true}});
                //this.$store.state.global.eventVue.$emit('showPopCom', {_this: this, id: id, name: 'spOrderDetail'});
            },
            refundAudit(id){
                /**
                 * 触发mypop.vue下showPopCom监听事件 显示refundAudit模板
                 * */
                this.$store.state.global.eventVue.$emit('showPopCom', {_this: this, id: id, name: 'refundAudit'});
            },
        },
        computed: {
            ctl(){
                return this.$route.query.ctl;
            },
            is_admin(){
                return util.is_admin(this);
            },
            status(){
                return logic.detail.getDetail(this, this._id,'status').val;
            },
        },
        watch: {},

        props: ['col', '_id', 'detail_info'],
        created() {
        },
    }
</script>
<style rel="stylesheet/less" lang="less"></style>
